package com.team10.hotel.service.impl;


import com.team10.hotel.domain.BreakfastImage;
import com.team10.hotel.mapper.BreakfastImageMapper;
import com.team10.hotel.service.BreakfastImageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BreakfastImageServiceImpl implements BreakfastImageService {
    @Autowired
    private BreakfastImageMapper breakfastImageMapper;
    @Override
    public int saveBreakfastImage(BreakfastImage breakfastImage) {
        return breakfastImageMapper.insert(breakfastImage);
    }

    @Override
    public List<BreakfastImage> listBreakfastImage(Integer id) {
        return breakfastImageMapper.selectBreakfastImageByBreakfastId(id);
    }

    @Override
    public BreakfastImage findBreakfastImage(Integer id) {
        return breakfastImageMapper.selectByPrimaryKey(id);
    }

    @Override
    public int deleteBreakfastImage(Integer id) {
        return breakfastImageMapper.deleteByPrimaryKey(id);
    }
}
